package utils;
import java.util.ArrayList;
import java.util.List;


public class ListaSensores {
	private static ArrayList stockSensor;
	
	static{
		stockSensor = new ArrayList();
		stockSensor.add("Sensor"+Sensores.HUMEDAD);
		stockSensor.add("Sensor"+Sensores.LUZ);
		stockSensor.add("Sensor"+Sensores.TEMPERATURA);
		stockSensor.add("Sensor"+Sensores.VENTILACION);
		stockSensor.add("Sensor"+Sensores.RIEGO);
	}
	
	public static int getIndexSensor(String nameSensor){
		int index = 0;
		for(int i = 0; i<stockSensor.size();i++){
			if(stockSensor.get(i).toString().equals(nameSensor) ){
				index = (i+1);
			}
		}
		return index;
	}
	
	public static String getNameSensor(int indexSensor){
		String name = "";
		name = stockSensor.get(indexSensor).toString();
		return name;
	}
}
